﻿using System.Data;
using System.Data.Common;

namespace DataAccess
{
    public class DbParam
    {
        /// <summary>
        /// Execute parameter's name
        /// </summary>
        public string ParamName { get; set; }

        /// <summary>
        /// Execute parameter's value
        /// </summary>
        public object ParamValue { get; set; }

        /// <summary>
        /// Specifies the type of a parameter within a query relative to the System.Data.DataSet.
        /// </summary>
        public ParameterDirection Direction { get; set; }

        /// <summary>
        /// The return value
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// DbParameter object
        /// </summary>
        public DbParameter DbParameter { get; set; }

        public DbParam()
        { 
        
        }

        public DbParam(string paramName, object paramValue)
        {
            this.ParamName = paramName;
            this.ParamValue = paramValue;
        }

        public DbParam(string paramName, object paramValue, ParameterDirection direction)
            : this(paramName, paramValue)
        {
            this.Direction = direction;
        }
    }
}
